﻿
<!--////////////////////////////////////////Started Map//////////////////////////////-->
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAitcYEaGEy3dFqkIFOe8oMBTgsbIaBmxYfsLux2Ri9wNcAodADRTg4FNF4mb6YiuLL0pBHUupo1Br8Q"
  type="text/javascript"></script>
<!--[get_about_by_id about_id=1]-->
<script type="text/javascript">
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        var point = new GLatLng(<!--[$view.map_lat]-->, <!--[$view.map_lon]-->);


       // define the crosshair tile layer and its required functions
        var crossLayer = new GTileLayer(new GCopyrightCollection(""), 0, 15);
        crossLayer.getTileUrl =  function(tile, zoom) {
          return "./include/tile_crosshairs.png";
        }
        crossLayer.isPng = function() {return true;}

        // Create a new map type incorporating the tile layer
        var layerTerCross = [ G_PHYSICAL_MAP.getTileLayers()[0],
                              crossLayer ];
        var mtTerCross = new GMapType(layerTerCross,
                                      G_PHYSICAL_MAP.getProjection(), "Ter+");

        map.addMapType(G_PHYSICAL_MAP);
        map.addMapType(mtTerCross);
        map.setCenter(point ,12);
        map.addControl(new GLargeMapControl())

        var mapControl = new GHierarchicalMapTypeControl();
        // Set up map type menu relationships
        mapControl.clearRelationships();
        mapControl.addRelationship(G_SATELLITE_MAP, G_HYBRID_MAP, "Labels", false);
        mapControl.addRelationship(G_PHYSICAL_MAP, mtTerCross, "Crosshairs");

        marker = new GMarker(point);
        var html = '<p align="left"> <br/> <!--[$view.contact_us]--> s</p>';
        GEvent.addListener(marker, 'click', function(){ 
          marker.openInfoWindowHtml(html);
        });

/*        map.openInfoWindow(map.getCenter(),
                       document.createTextNode("ที่ตั้งร้าน : <!--[$view.address]--> จังหวัด<!--[$view.province_name]-->"));
*/                      
        /*
        var html = '<b>' + '<!--[$view.address]-->' + '</b> <br/>' + '<!--[$view.province_name]-->'  + '<br>';
          GEvent.addListener(point, 'click', function() {
          point.openInfoWindowHtml(html);
          }); 
        */
        // Add control after you've specified the relationships
        map.addOverlay(marker);
        map.addControl(mapControl);
      }
    }

</script>
  </head>

<!--////////////////////////////////////////End Map//////////////////////////////-->

<body onLoad="initialize()" onUnload="GUnload()">

		<div >
        <!--[$concact_us]-->
		</div>



<!-- ######################################################################################################### -->
<br />
<fieldset><legend>แผ่นที่</legend>
  <div align="center" id="map_canvas" style="width: 100%; height: 400px"></div>
</fieldset>

		<div >
        <a href="<!--[pnmodurl modname='IShopStore' func='form' ctrl='contactus']-->"><span>เชียนถึงเรา</span></a>
		</div>
 </body>